{% extends "order/base.html" %}{% load i18n %} 
{% block title %}{% trans "Select address book title" %}{% endblock %}
{% block content %}
<div>
	{% if order%}
	<a href="/order/view/{{ order.id }}/">{{ order.name}}</a> {%endif%}
	<br />
	{% if user and addressbooks%}

	<table>
		{% for book in addressbooks %}
		<tr>
			<td>
				{% trans "Order user name:" %}
			</td>
			<td>
				{{ book.name }}
			</td>
		</tr>
		<tr>
			<td>
				{% trans "phone:" %}
			</td>
			<td>
				{{ book.phone }}
			</td>
		</tr>
		<tr>
			<td>
				{% trans "email:" %}
			</td>
			<td>
				{{ book.email }}
			</td>
		</tr>
		<tr>
			<td>
				{% trans "address:" %}
			</td>
			<td>
				{{ book.address }}
			</td>
		</tr>
		<tr>
			<td>
				{% trans "postnum:" %}
			</td>
			<td>
				{{ book.postnum }}
			</td>
		</tr>
		<tr>
			<td>
				{% trans "province:" %}
			</td>
			<td>
				{{ book.province }}
			</td>
		</tr>
		<tr>
			<td>
				{% trans "city:" %}
			</td>
			<td>
				{{ book.city }}
			</td>
		</tr>
		<tr>
			<td>
				{% trans "district:" %}
			</td>
			<td>
				{{ book.district }}
			</td>
		</tr>
		<tr>
			<td>
				&nbsp;
			</td>
			<td>
				<a href="/order/user/add/{{book.id}}/">{% trans "Select" %}</a>
			</td>
		</tr>

		{% endfor%}
	</table>
	{% else%} {% trans "no address book!" %}
	<a href="/addressbook/new/">{% trans "user addressbook Add New" %}</a>{% endif %}
</div>
{% endblock %}
